package manager;

import java.util.ArrayList;

import bean.Medecin;
import bean.Medicament;
import bean.Ordonnance;
import bean.Patient;
import bean.Prescription;

public class Manager {

	private boolean connected = false;
	private ArrayList<String> messages = new ArrayList<String>();
	private String nom = "";
	private String prenom = "";
	private Medecin medecin = null;
	private ArrayList<Patient> listPatient = null;
	private ArrayList<Medicament> listMedicament = null;
	private ArrayList<Ordonnance> listOrdonnance = null;
	private Ordonnance ordonnance = null;
	private ArrayList<Prescription> listPrescription = null;

	public Ordonnance getOrdonnance() {
		return ordonnance;
	}

	public void setOrdonnance(Ordonnance ordonnance) {
		this.ordonnance = ordonnance;
	}

	public ArrayList<Prescription> getListPrescription() {
		return listPrescription;
	}

	public void setListPrescription(ArrayList<Prescription> listPrescription) {
		this.listPrescription = listPrescription;
	}

	public ArrayList<Medicament> getListMedicament() {
		return this.listMedicament;
	}

	public void setListMedicament(ArrayList<Medicament> setListMedicament) {
		this.listMedicament = setListMedicament;
	}

	public ArrayList<String> extraireMessages() {
		ArrayList<String> res = messages;
		messages = new ArrayList<String>();
		return res;
	}

	public boolean isConnected() {
		return connected;
	}

	public void setConnected() {
		connected = true;
	}

	public void setDisconnected() {
		connected = false;
		setNom(null);
		setPrenom(null);
	}

	public void setMedecin(Medecin medecin) {
		this.medecin = medecin;
	}

	public Medecin getMedecin() {
		return this.medecin;
	}

	public ArrayList<String> getMessages() {
		return messages;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getNom() {
		return nom;
	}

	public ArrayList<Patient> getListPatient() {
		return listPatient;
	}

	public void setListPatient(ArrayList<Patient> list) {
		this.listPatient = list;
	}

	public void setListOrdonnance(ArrayList<Ordonnance> listOrdonnance) {
		this.listOrdonnance = listOrdonnance;
	}

	public ArrayList<Ordonnance> getListOrdonnance() {
		return listOrdonnance;
	}
}
